package com.qf.servlet;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Ypl
 * @version V1.0
 * @Project September-mavens
 * @Package com.qf.servlet
 * @Description:
 * @Date 2022/10/8 15:46
 */
@SuppressWarnings("all")
@Controller
@RequestMapping("/test")
public class TestServlet {
    /**
     * 测试01-02
     * @return
     */
    @RequestMapping("/testnomal")
    public String testNomal(){
        System.out.println(1/0);
        return "/index.jsp";
    }

    /**
     * 测试返回json串
     */
    @RequestMapping("/json")
    @ResponseBody
    public String json(){
        System.out.println(1/0);
        return "success";
    }
}
